<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var arr = [undefined,'a','b','c','d','e',null];
        //使用toString()将数组转换为字符串
        console.log(arr.toString());  
        //使用join()将数组转换为字符串
        console.log(arr.join());
        console.log(arr.join(' '));
        console.log(arr.join('-'));
    </script>
</head>
<body>
    
</body>
</html>